<?php

/**
 * Place form.
 *
 * @package    vogue
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class PlaceForm extends BasePlaceForm
{
  public function configure()
  {
      //unset();
  		
			# WIDGETS
      $this->widgetSchema['name'] 	    = new sfWidgetFormInputText(array(), array());
      $this->widgetSchema['image']    	= new sfWidgetFormInputFile(array(), array());      
    	$this->widgetSchema['address']    = new sfWidgetFormTextarea(array(), array());
    	$this->widgetSchema['map_lat']    = new sfWidgetFormInputText(array(), array('class'=>'w100px;'));
    	$this->widgetSchema['map_lng']    = new sfWidgetFormInputText(array(), array('class'=>'w100px;'));
    	
    	# VALIDATORS
    	$this->validatorSchema['name']   	   = new sfValidatorString();
    	$this->validatorSchema['image'] 		 = new sfValidatorFile($this->getFileAttrs('place'), $this->getFileOpts());
    	$this->validatorSchema['address']    = new sfValidatorPass();
    	$this->validatorSchema['map_lat']    = new sfValidatorNumber(array('required'=>false), array());
    	$this->validatorSchema['map_lng']    = new sfValidatorNumber(array('required'=>false), array());
    	
    	# HELP
    	$this->widgetSchema->setHelp('image', $this->getFileHelp());
  }
}
